import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

//在main.js中引入我们封装好axios的api文件
// import './api/axios.js'
import {createPinia} from 'pinia'

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';

const app = createApp(App)
//需要注册Elementui全局Icon,项目中才能使用Icon
for(const [key,component] of Object.entries(ElementPlusIconsVue)){
  app.component(key, component)
}

const pinia = createPinia()
app
  .use(router)
  .use(pinia)
  .use(ElementPlus, {locale: zhCn})
  .mount('#app')
